import type { IList, IResult } from "@/types/common";
import { getAxios, commonAxiosJson } from "@/utils/request.js";
/* 租机账单 地址 */
const url = "/back/installment-bill";
/* 获取 账单信息 */
export const getTnstallmentBillInfo = <T, D>(params?: D): Promise<IResult<IList<T>>> => {
  return getAxios<IList<T>, D>(url, params);
};
/* 获取 账单支付状态信息 */
export const getCheckPayStatusInfo = <T, D>(params?: D): Promise<IResult<T>> => {
  return getAxios<T, D>(url + "/check-pay-status", params);
};
/* 修改账单金额 信息 */
export const putTnstallmentBillPriceInfo = <T, D>(params: D): Promise<IResult<T>> => {
  return commonAxiosJson<T, D>(url + "/update-price", params, "PUT");
};
/* 修改账单支付状态 信息 */
export const putTnstallmentBillPayStatusInfo = <T, D>(params: D): Promise<IResult<T>> => {
  return commonAxiosJson<T, D>(url + "/update-pay-status", params, "PUT");
};
/* 抖音账单核销 信息 */
export const putTnstallmentBillPushDeliveryInfo = <T, D>(params: D): Promise<IResult<T>> => {
  return commonAxiosJson<T, D>(url + "/push-delivery", params, "PUT");
};
/* 抖音所有账单核销 信息 */
export const putTnstallmentBillAllPushDeliveryInfo = <T, D>(params: D): Promise<IResult<T>> => {
  return commonAxiosJson<T, D>(url + "/all-push-delivery", params, "PUT");
};
/* 获取账单列表预览 */
export const getPreBillListInfo = <T, D>(params?: D): Promise<IResult<T>> => {
  return getAxios<T, D>(url + "/get-pre-bill-list", params);
};
